import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/painting/basic_types.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:yurun_smartmerchants/res/colours.dart';
import 'package:yurun_smartmerchants/utils/app_size.dart';

class CustomLoadFooter extends Footer{

  @override
  Widget contentBuilder(
      BuildContext context,
      LoadMode loadState,
      double pulledExtent,
      double loadTriggerPullDistance,
      double loadIndicatorExtent,
      AxisDirection axisDirection,
      bool float,
      Duration completeDuration,
      bool enableInfiniteLoad,
      bool success,
      bool noMore) {
    // TODO: implement contentBuilder
    return Container(
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
//          Offstage(
//            offstage: noMore,
//            child: Container(
//              width: AppSize.height(20),
//              height: AppSize.height(20),
//              margin: EdgeInsets.only(right: AppSize.width(10)),
//              child: CircularProgressIndicator(strokeWidth: 1,),
//            ),
//          ),
          Text(noMore ? '没有更多了': '加载中...',style: TextStyle(fontSize: AppSize.sp(24),color: Colours.color_313131),)
        ],
      ),
    );
  }
}